﻿<UserControl x:Class="Spenta.StreetCare.Silverlight.UserControls.CreateNewReportCategorySelectorUserControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:ViewModels="clr-namespace:Spenta.StreetCare.Silverlight.MVVM.ViewModels" mc:Ignorable="d"
    d:DesignHeight="250" d:DesignWidth="420">
    <UserControl.Resources>
        <ViewModels:CreateNewReportCategorySelectorViewModel x:Key="CreateNewReportCategorySelectorViewModel" />
    </UserControl.Resources>
    <ItemsControl Height="Auto" DataContext="{StaticResource CreateNewReportCategorySelectorViewModel}" d:DataContext="{d:DesignData /SampleData/CreateNewReportCategorySelectorViewModelSampleData.xaml}" ItemsSource="{Binding Categories}" ScrollViewer.HorizontalScrollBarVisibility="Hidden" BorderBrush="Transparent" HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Stretch" Width="Auto" Background="Transparent">
        <ItemsControl.ItemTemplate>
            <DataTemplate>
                <StackPanel RenderTransformOrigin="0.414,0.48" Orientation="Horizontal" Height="45" >
            		<Border Style="{StaticResource CategoryColor}" Background="{Binding CategoryColor, Converter={StaticResource PushpinTypeBrushConverter}}" VerticalAlignment="Top" Width="20" Height="20" Margin="0,3,0,0">
                		<Image Source="{Binding CategoryImageUrl}" />
                	</Border>
                	<RadioButton Command="{Binding CategorySelectedCommand, Mode=OneWay, Source={StaticResource CreateNewReportCategorySelectorViewModel}}" CommandParameter="{Binding}" IsChecked="{Binding IsDefault, Mode=TwoWay}" GroupName="NewReportCategories" Content="{Binding CategoryTitle}" Style="{StaticResource CategorySelectorRadioButton}" HorizontalAlignment="Left" Margin="10,5,0,0" VerticalAlignment="Top" MinHeight="0" MaxWidth="200" MinWidth="200"/>
                	<StackPanel Margin="0" Orientation="Horizontal" VerticalAlignment="Top">

                		<Grid Style="{StaticResource CategoryReportDescription}">
                			<Rectangle Fill="#FFE5E5E5"/>
                			<TextBlock Style="{StaticResource CategorySelectorTextBlock}" Text="{Binding CategoryDescription}" />
                		</Grid>
                        
                	</StackPanel>
					
					
            	</StackPanel>
            </DataTemplate>
        </ItemsControl.ItemTemplate>
    </ItemsControl>
</UserControl>
